<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box{
            width:500px;
            height:200px;
            border:5px solid red;
            border-left: 25px solid blue;
            padding:20px;
            margin:30px;
        }
    </style>
</head>
<body>
    <div id="box">

    </div>
    <script>
        var oBox = document.getElementById('box');
        for(var i = 0; i < 2000; i++){
            var op = document.createElement('p');
            op.innerHTML = i;
            oBox.appendChild(op);
        }
        console.log('clientHeight: ' ,oBox.clientHeight); // height + 上下padding
        console.log('clientWidth: ' , oBox.clientWidth); // width + 左右padding
        console.log('clientLeft: ', oBox.clientLeft);// 左侧边框宽度
        console.log('clientTop: ', oBox.clientTop);// 上边框宽度
        console.log('clientRight: ', oBox.clientRight);// undefined
        console.log('clientBottom: ', oBox.clientBottom);// undefined
        oBox.contentEditable = true;// 了解


    </script>
</body>
</html>